<?php
	echo $html->css('main/form');
	echo $this->Html->script('jquery.validate');
	echo $this->Html->script('jquery.metadata');
	if(Configure::read('Config.language') != 'en') {
		echo $this->Html->script('language/validation.' . Configure::read('Config.language') . '.js');
	}

	echo $session->flash();
?>
<div class="product-box">
<h3><?php echo __('Quên mật khẩu'); ?></h3>
<form id="formValidation" action="<?php echo Router::url(array(											'action'	=> 'forget_pwd')); ?>" enctype="multipart/form-data" method="post">
<fieldset>

	<?php
		echo $form->input('Member.username', array(
			'type'=>'text',
			'label'=>__('Username', true),
			'after' => '<span class="require">*</span>',
			'div'=>true,
			'size'=>50,
			'validate'	=> 'required:true'
		));
	?>
	<div class="input">
		<label><?php echo __('Security code', true); ?></label>
		<?php
		echo $form->input('Security.code', array('type'=>'text', 'label'=>false, 'div'=>false, 'size'=>6,
			'validate'	=> 'required:true' ,'value'=>''));
		?>
		<img src="<?php echo $captcha_image_url; ?>" id="captcha" alt="CAPTCHA Image" />
		<?php echo (!empty($error_captcha)) ? '<span class="status">'.$error_captcha.'</span>' : ''; ?>
	</div>
	<div class="submit">
		<?php echo $form->button(__('Accept', true), array('class'=>'h30x137 accept', 'type'=>'submit', 'id'=>'regSubmit')); ?>
		<?php echo $form->button(__('Reset', true), array('class'=>'h30x137 reset', 'type'=>'reset')); ?>
	</div>
	<?php echo $form->end(); ?>
</fieldset>
</form>
<script type="text/javascript">
$(document).ready(
	function() {
		$.metadata.setType("attr", "validate");
		$("form#formValidation").validate();
	}
);
</script>
</div>